using System;
using ClickSocial.Framework;


namespace ClickSocial
{
    public partial class Event : CDefault
    {
        private string m_evento_id = "0";

        public string EventoID
        {
            get
            {
                m_evento_id = ViewState["EventoID"] as string ?? string.Empty;
                return m_evento_id;
            }
            set
            {
                m_evento_id = value;
                ViewState["EventoID"] = m_evento_id;
            }
        }

        protected void Page_Init(object sender, EventArgs e)
        {
            //NewUser1.UserCreated += new EventHandler(NewUser1_UserCreated);
            //NewEvent1.EventChanged += new EventHandler(NewEvent1_EventChanged);            
            NewEvent1.EventoID = EventoID = Request["EventoID"] ?? "0";
            //if (User.IsInRole(Global.RolesApp.UserEvent))
            //{
            //    Wizard1.WizardSteps[0].Wizard.StartNextButtonText = "Salvar";
            //}
            
        }

        protected void Page_Load(object sender, EventArgs e)
        {
           
        }

        //protected void Wizard1_ActiveStepChanged(object sender, EventArgs e)
        //{
        //    if (Wizard1.ActiveStepIndex == 1)
        //    {
        //        if (NewEvent1.Save())
        //        {
        //            if (User.IsInRole(Global.RolesApp.UserEvent))
        //            {
        //                Response.Redirect("MyEvents.aspx");
        //            }
        //            else
        //            {
        //                if (NewEvent1.VisibilidadEvento == "1" || NewEvent1.VisibilidadEvento == "2")//opc publico o sin listar
        //                {
        //                    Wizard1.MoveTo(Wizard1.WizardSteps[2]);                    
        //                }
        //                NewUser1.Visible = false;                    
        //            }                    
        //        }
        //        else
        //        {
        //            Wizard1.MoveTo(Wizard1.WizardSteps[0]);                    
        //        }
        //    }
        //}

        //protected void btnNewUser_Click(object sender, EventArgs e)
        //{
        //    NewUser1.Visible = true;
        //}

        //protected void NewUser1_UserCreated(object sender, EventArgs e)
        //{
        //    //SetUser1.BindData();
        //    NewUser1.Visible = false;            
        //    long event_id = 0; 
        //    if(long.TryParse(EventoID, out event_id))
        //    {
        //        NewUser1.Notificar(event_id);
        //    }
        //    NewUser1.ResetControls();
        //}

       

        //protected void Wizard1_Init(object sender, EventArgs e)
        //{
        //    Wizard1.ActiveStepIndex = 0;
        //}

        //protected void NewEvent1_EventChanged(object sender, EventArgs e)
        //{
        //    //EventoID = NewEvent1.EventoID;
        //    //SetUser1.EventoID = EventoID;
        //    //SetUser1.LoadUserEvent();            
        //}
    }
}
